package xxl.robotlegs.extensions.commandcenter.impl 
{
	/**
	 * ...
	 * @author XXL
	 */
	public class CommandPayload 
	{
		private var _values:Array;
		private var _classes:Array;
		
		public function CommandPayload(values:Array = null, classes:Array = null) 
		{
			_values = values || [];
			_classes = classes || [];
		}
		
		public function get values():Array 
		{
			return _values;
		}
		
		public function get classes():Array 
		{
			return _classes;
		}
		
		public function get length():int
		{
			return _classes.length;
		}
		
		public function addPayload(payloadValue:Object, payloadClass:Class):CommandPayload
		{
			_values.push(payloadValue);
			_classes.push(payloadClass);
			return this;
		}
		
		public function hasPayload():Boolean
		{
			return _values.length > 0 && _classes.length == _values.length;
		}
	}

}